package MyScreen;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

import model.AuditionCanvas;
import model.ThanhLan;


public class MainPage extends MIDlet {

	Display display;
	AuditionCanvas audition;
	public MainPage() {
    audition=new AuditionCanvas(this);
	hienthi(audition);
		
	}
	public void vonglapgame()
	{
		while (true)
		{
			try {
				Thread.sleep(20);
				audition.update();
				
				
				
			}
			catch(Exception e)
			{
				
			}
		}
	}
	public void hienthi(Displayable d)
	{
		display=Display.getDisplay(this);
		display.setCurrent(d);
		
	}
	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
		// TODO Auto-generated method stub

	}

	protected void pauseApp() {
		// TODO Auto-generated method stub

	}

	protected void startApp() throws MIDletStateChangeException {
		// TODO Auto-generated method stub
		vonglapgame();

	}

}
